Changing PiFace projects or runtime systems for Raspberry Pi to use the generice IO provider

The access to hardware IOs of a →PiFace is possible by using a generic IO provider concept of Neuron Power Engineer. This article informs whether and which steps are necessary for this access.

Recommended: Using the project template for PiFace in Neuron Power Engineer version ≥ 1.121.0 and Neuron RTS max version ≥ 3.32.0

You do not have to do anything. Reasons:

  • The PLC-object raspberry of the project that has been created based on a project template for PiFace, e.g. Turn LEDs on/off (PiFace required), using Neuron Power Engineer version ≥ 1.121.0 already contains the needed code.

  • Neuron RTS max for Raspberry Pi, ≥ version 3.32.0 is already correctly configured.

Using other projects

If you want to use other projects (e.g. projects that have been created by using a Neuron Power Engineer version 1.120.0), the following specification for IO_IMPORT is required within the PLC-object:

Example
{ IO_IMPORT PROVIDER := GenericProvider, SERVICE := PiFace }
Example: Code block for a Raspberry Pi configuration within an PLC-object
CONFIGURATION RaspbianConfiguration
  RESOURCE raspberry ON Raspbian { ON_CHANNEL := RaspberryChannel }
    { IO_IMPORT PROVIDER := GenericProvider, SERVICE := PiFace }
    VAR_GLOBAL
      DigitalIn1 AT %IX1.0.0 : BOOL;
      (* ... and more declarations of global variables ... *)
    END_VAR
    {IO} TASK DefaultTask(INTERVAL := TIME#500ms, PRIORITY := 38229);
    PROGRAM LEDInstance WITH DefaultTask :
    LED;
  END_RESOURCE
END_CONFIGURATION

Using Neuron RTS max configuration file from a previous Neuron RTS max version

It is indispensable to use Neuron RTS max for Raspberry Pi, ≥ version 3.31.0!

If you want to go on using the Neuron RTS max configuration file of a previous Neuron RTS max version, you have to change this file.

  1. If Neuron RTS max is running, terminate Neuron RTS max.

  2. Copy the configuration file /opt/RTS/PLC/RTSIO.cfg of the previous Neuron RTS max version into the installation directory of the current Neuron RTS max version.

  3. Open the file /opt/RTS/PLC/RTSIO.cfg in a text editor.

  4. Search for the following lines:

    Existing lines

    AddSymbol IOSS.DeviceNum 1
    AddSymbol IOSS.Name[0] RTSS_PIFACE_IO
    AddSymbol IOSS.SSId[0] 536870978
    AddSymbol IOSS.DeviceId[0] 1
    AddSymbol IOSS.IB[0] 4096
    AddSymbol IOSS.OB[0] 4096
    AddSymbol IOSS.MB[0] 0
    LoadLibrary RTSS_IO
    LoadLibrary RTSS_PIFACE_IO 
  5. Delete the lines incl. line  LoadLibrary RTSS_IO.
    Hence, the following line remains out of the above line block within the file:

    Remaining line
    LoadLibrary RTSS_PIFACE_IO 
  6. Save the changes and exit the editor.

  7. Restart Neuron RTS max.